package cn.iocoder.yudao.module.trade.controller.admin.order.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Schema(description = "管理后台 - 贵金属交易订单新增/修改 Request VO")
@Data
public class TradeOrderSaveReqVO {

    @Schema(description = "订单编号（时间戳+用户ID哈希）", requiredMode = Schema.RequiredMode.REQUIRED)
    private String orderNo;

    @Schema(description = "订单类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "订单类型不能为空")
    private Integer orderType;

    @Schema(description = "贵金属类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @NotNull(message = "贵金属类型不能为空")
    private Integer metalType;

    @Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "25184")
    @NotNull(message = "用户编号不能为空")
    private Long userId;

    @Schema(description = "用户 IP", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "用户 IP不能为空")
    private String userIp;

    @Schema(description = "用户备注", example = "随便")
    private String userRemark;

    @Schema(description = "订单状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @NotNull(message = "订单状态不能为空")
    private Integer status;

    @Schema(description = "商家备注", example = "你说的对")
    private String remark;

    @Schema(description = "支付订单编号", example = "18918")
    private Long payOrderId;

    @Schema(description = "支付状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @NotNull(message = "支付状态不能为空")
    private Integer payStatus;

    @Schema(description = "结算时间")
    private LocalDateTime settleTime;

    @Schema(description = "结算方式")
    private Integer settleMethod;

    @Schema(description = "订单取消时间")
    private LocalDateTime cancelTime;

    @Schema(description = "下单重量", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "下单重量不能为空")
    private BigDecimal weight;

    @Schema(description = "旧料重量(仅在旧料兑换)")
    private BigDecimal exchangeWeight;

    @Schema(description = "已收款金额", example = "9204")
    private BigDecimal receivePrice;

    @Schema(description = "已收定金")
    private BigDecimal receiveDeposit;

    @Schema(description = "下单价格", requiredMode = Schema.RequiredMode.REQUIRED, example = "24911")
    @NotNull(message = "下单价格不能为空")
    private BigDecimal orderPrice;

    @Schema(description = "结算价格", requiredMode = Schema.RequiredMode.REQUIRED, example = "16114")
    @NotNull(message = "结算价格不能为空")
    private BigDecimal settlePrice;

    @Schema(description = "优惠金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "26889")
    @NotNull(message = "优惠金额不能为空")
    private BigDecimal discountPrice;

    @Schema(description = "运费金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "23022")
    @NotNull(message = "运费金额不能为空")
    private BigDecimal deliveryPrice;

    @Schema(description = "定金金额", example = "22926")
    private BigDecimal depositPrice;

    @Schema(description = "定金优惠金额", example = "17878")
    private BigDecimal depositDiscount;

    @Schema(description = "延期费用")
    private BigDecimal delayFee;

    @Schema(description = "毛利润")
    private BigDecimal grossProfit;

    @Schema(description = "所获积分")
    private Integer point;

    @Schema(description = "总服务费")
    private BigDecimal totalServiceFee;

    @Schema(description = "定金参数/g")
    private BigDecimal depositPriceConf;

    @Schema(description = "免息天数")
    private Integer interestFreeDays;

    @Schema(description = "延期费用（参数）")
    private BigDecimal delayFeeConf;

    @Schema(description = "积分参数")
    private String pointConf;

    @Schema(description = "结算参数")
    private String settleConf;

}